import React, { useState } from "react";
import styles from "./index.module.less";
import EditArea from "./EditArea";
import FestivalList from "./FestivalList";

const CustomizeFestival = () => {
    const [fes, setFes] = useState({});
    const [isReedit, setIsReedit] = useState(false);
    const [n, setN] = useState(0);

    const getFes = (festival) => {
        setFes(festival);
    };

    const getReedit = (isReedit) => {
        setIsReedit(isReedit);
    };

    const getN = (n) => {
        setN(n);
    };

    return (
        <div className={styles.customize_Festival}>
            <div className={styles.wrap}>
                <EditArea
                    fes={fes}
                    isReedit={isReedit}
                    getReedit={getReedit}
                    getN={getN}
                />
                <FestivalList
                    getFes={getFes}
                    isReedit={isReedit}
                    n={n}
                    getReedit={getReedit}
                    getN={getN}
                />
            </div>
        </div>
    );
};

export default CustomizeFestival;
